<%@ page pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><fmt:message key="flightAdjustInfoList.title"/></title> 
<link rel="stylesheet" type="text/css" media="all"	href="<c:url value='/styles/layout.css'/>" />
<script src="<c:url value="/scripts/datetime.js"/>" language="javascript"></script>
<script src="<c:url value="/scripts/common.js"/>" language="javascript"></script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function VShowtz(obj){
	if(obj.id=="lstz" || obj.id=="jhtz")
		tzrow.style.display=""
	else{
		tzrow.style.display="none"
	}
}	
//-->
</script>
</head>

<body leftmargin="0" topmargin="0">
<html:form action="flightAdjustInfo" method="post" styleId="flightAdjustInfoForm">

<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="44" class="home-content-title"><img src="images/home_ico_listTitle.gif" width="22" height="20" align="absmiddle">航班调整信息更新<br></td>
  </tr>
     <logic:messagesPresent>
		<tr id="messagesPresentTrId" style="display:;">
			<td valign="top" class="black12" height="20">
				<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
					<tr>
						<td class="arror_bg">
							<span class="arror_title">
						     您的操作存在如下错误：<br></span>
						     <html:errors/>
					    <br></td>
				    </tr>
			    </table>
			<br></td>
		</tr>
   </logic:messagesPresent>
    <tr id="messageShowTrId" style="display:none;">
	<td valign="top" class="black12">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr>
	<td class="arror_bg_s">
	<span class="arror_title_s"> 
        保存信息成功!<br/>
     </span>
    <br></td>
    </tr>
    </table>
	<br></td>
	</tr>
  <tr>
    <td height="40" class="home-search-space">&nbsp;<fmt:message key="common.warning"/></td>
  </tr>
  <tr>
    <td valign="top"> 
      <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td class="home-table-topline"></td>
        </tr>
        <tr> 
          <td class="home-table-leftline"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td class="home-table-tool-content"> 
			 <input type="button" class="home-inputBtn" onclick="doCommit()" value="<fmt:message key="button.save"/>"
				<logic:messagesNotPresent>
					<c:if test="${null ne flightAdjustInfoForm.processinstid}">
						disabled
					</c:if>
				</logic:messagesNotPresent>
			/>
            			
			
			<html:reset styleClass="home-inputBtn">
            			<fmt:message key="button.reset"/>
			</html:reset>
			 <html:hidden property="saveFlag"/> 
			<input type="button" class="home-inputBtn" onClick="back();" value="取消">
        <c:if test="${5!= flightAdjustInfoForm.saveFlag}"> 
           
       		<input type="button" class="home-inputBtn"  value="发布流程" onclick="onStartFlow()" 
       			<logic:messagesNotPresent>
					<c:if test="${null ne flightAdjustInfoForm.processinstid}">
						disabled
					</c:if>
				</logic:messagesNotPresent>
       		 />
       	 </c:if>
		</td>
              </tr>
              <tr>
                <td align="center" valign="top">&nbsp;</td>
              </tr>
              <tr> 
                <td valign="top" class="home-edittable-space"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td> <table width="100%" border="0" cellpadding="4" cellspacing="1" class="home-subtable-bgcolor">
						   <html:hidden property="id"/>
						   <html:hidden property="processinstid" />
						   <html:hidden property="saveFlag" value="1" />
						 
						  <tr>
							<td height="25" width=20% class="home-subtable-view-tdstyle-right">航班号：</td>
							<td  class="home-subtable-view-tdstyle-left"><c:out value="${flightInfo.flightNum}"/></td>
							<td width=20% class="home-subtable-view-tdstyle-right">计划起飞日期/时间：</td>
							<td  class="home-subtable-view-tdstyle-left"><c:out value="${flightInfo.std}"/></td>
						  </tr>
						  <tr>
							<td class="home-subtable-view-tdstyle-right">飞机号：</td>
							<td  class="home-subtable-view-tdstyle-left"><c:out value="${flightInfo.acReg}"/></td>
							<td class="home-subtable-view-tdstyle-right">经停站：</td>
							<td class="home-subtable-view-tdstyle-left">&nbsp;</td>
						  </tr>
						  <tr>
							<td class="home-subtable-view-tdstyle-right">始发站：</td>
							<td  class="home-subtable-view-tdstyle-left"><c:out value="${flightInfo.depaName}"/></td>
							<td class="home-subtable-view-tdstyle-right">终点站：</td>
							<td  class="home-subtable-view-tdstyle-left"><c:out value="${flightInfo.arrName}"/></td>
						  </tr>
						 <tr>
							<td height="25" class="home-subtable-view-tdstyle-right"><font color="red">*</font>调整类别：</td>
							<td colspan=10 class="home-subtable-view-tdstyle-left">
							<input type="radio" name="adjustType" value="1" id="lstz" <c:if test="${flightAdjustInfoForm.adjustType==1 or flightAdjustInfoForm.adjustType==null}">checked</c:if> onClick="VShowtz(this)"><label for="lstz">临时性调整</label>
							<input type="radio" name="adjustType" value="2" id="lscx" <c:if test="${flightAdjustInfoForm.adjustType==2 }">checked</c:if> onClick="VShowtz(this)"  ><label for="lscx">临时性取消</label>
							<input type="radio" name="adjustType" value="3" id="jhtz" <c:if test="${flightAdjustInfoForm.adjustType==3}">checked</c:if> onClick="VShowtz(this)"><label for="jhtz">计划性调整</label>
							<input type="radio" name="adjustType" value="4" id="jhcx" <c:if test="${flightAdjustInfoForm.adjustType==4}">checked</c:if> onClick="VShowtz(this)"><label for="jhcx">计划性取消</label></td>
						 </tr>
						 
						  <tr>
						  <%--
						  <td class="home-subtable-view-tdstyle-right"><font color="red">*</font>调整原因(内部)：</td>
						  <td class=home-subtable-view-tdstyle-left>
			                 <html:select name="flightAdjustInfoForm" property="reasonIn" size="1" styleId="reasonIn" style="width:80px" >
			                  <html:option  value="">&nbsp;</html:option> 
			                 <html:options collection="reasonIns"  property="id" labelProperty="name"/> 
			                  </html:select></td>
			             --%>     
					     <td class="home-subtable-view-tdstyle-right"><font color="red">*</font>调整原因(外部)：</td>
					     <td class=home-subtable-view-tdstyle-left>
			               <html:select name="flightAdjustInfoForm" property="reasonOut" size="1" styleId="reasonOut" style="width:80px" >
			               <html:option  value="">&nbsp;</html:option> 
			               <html:options collection="reasonOuts"  property="id" labelProperty="name"/> 
			               </html:select></td>
			             <td class="home-subtable-view-tdstyle-right">&nbsp;</td>
					     <td class=home-subtable-view-tdstyle-left>&nbsp;</td>  
					      </tr>
						 
						 <tr>
							<td class="home-subtable-view-tdstyle-right"><font color="red">*</font>调整前预计起飞时间：</td>
							<td colspan="3" class="home-subtable-view-tdstyle-left">
			                  <html:text property="oldTime" styleId="oldTime" styleClass="home-table-inputbox" /> 
			                  <img src="images/date.gif" border="0" onclick="fPopCalendar(oldTime,oldTime);return false"></td>
							
						  </tr>
						 
						 <tr id=tzrow>
							<td class="home-subtable-view-tdstyle-right"><font color="red">*</font>调整后预计起飞时间：</td>
							<td  class="home-subtable-view-tdstyle-left">
			                   <html:text property="currentTime" styleId="currentTime" styleClass="home-table-inputbox"  readonly="false"/> 
			                   <img src="images/date.gif" border="0" onclick="fPopCalendar(currentTime,currentTime);return false"></td>

							<td class="home-subtable-view-tdstyle-right"></td>
							<td class="home-subtable-view-tdstyle-left"></td>
						 </tr>
						
					      
					      <tr>
							<td class="home-subtable-view-tdstyle-right">调整前机型：</td>
							<td  class="home-subtable-view-tdstyle-left">
			                   <html:text property="oldType" styleId="oldType" styleClass="home-table-inputbox" /></td>
							<td class="home-subtable-view-tdstyle-right">调整后机型：</td>
							<td  class="home-subtable-view-tdstyle-left"><html:text property="currentType" styleId="currentType" styleClass="home-table-inputbox" /></td>
						  </tr>
					    
					      <%--
					      <tr> 
                            <td width="10%" class="home-subtable-view-tdstyle-right">延误内部原因：</td>
                            <td colspan="5" class="home-subtable-view-tdstyle-left"><textarea name="delayReason" class="home-table-inputbox" cols="81" rows="2" readonly><c:out value="${flightAdjustInfoForm.delayReason}"/></textarea></td>
                          </tr> 
                          --%>
                          <tr> 
                            <td width="10%" class="home-subtable-view-tdstyle-right">备注：</td>
                            <td colspan="5" class="home-subtable-view-tdstyle-left"><textarea name="memo" class="home-table-inputbox" cols="81" rows="2"><c:out value="${flightAdjustInfoForm.memo}"/></textarea></td>
                          </tr> 
                        </table></td>
                    </tr>
                  </table> 
                </td>
              </tr>
            </table>
		  </td>
        </tr>
        <tr> 
          <td height="12">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td class="home-table-bottom-left">&nbsp;</td>
                <td class="home-table-bottom-bg">&nbsp;</td>
                <td class="home-table-bottom-right">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
      </table>
	  </td>
  </tr>
  <tr>
    <td height="10">&nbsp;</td>
  </tr>
</table>
<script>
	function back(){
		flightAdjustInfoForm.method="post";
		flightAdjustInfoForm.action="flightInfo.html?abnomal=isAbnormal";
		flightAdjustInfoForm.submit();
	}
	function doCommit(){
		flightAdjustInfoForm.method="post";
		flightAdjustInfoForm.action="flightAdjustInfo.html?method=save&flightInfoId=<c:out value="${param.flightInfoId}"/>";
		flightAdjustInfoForm.submit();
	}
	function onStartFlow(){
		if(confirm("确定要发起流程吗?")){
				flightAdjustInfoForm.method="post";
				flightAdjustInfoForm.action="flightAdjustInfo.html?method=startFlow&flightInfoId=<c:out value="${flightAdjustInfoForm.flightInfoId}"/>";
				flightAdjustInfoForm.submit();
		}
	}
</script>	
</html:form>
</body>
</html>
<script>
//保存信息处理 add by kellen
if("1"=='<c:out value="${flag}"/>'){
	//alert("保存信息成功!");
	var messageShowTrIdTd=document.getElementById("messageShowTrId");
	messageShowTrIdTd.style.display="";
	//window.location=window.location;  
}else if("-1"=='<c:out value="${flag}"/>'){
	alert("保存信息失败!");
	 
}else if("2" ==  '<c:out value="${flag}"/>'){
	//window.location=window.location;  
}
//确定是否显示调整后预计起飞时间

if("1"=='<c:out value="${disPlay1}"/>' || "3"=='<c:out value="${disPlay1}"/>' || ""=='<c:out value="${disPlay1}"/>'){
		tzrow.style.display="";
		
	}else{
		tzrow.style.display="none"
	
}
</script>

